package ModelLayer;

/**
 * Write a description of class LoanDeliver here.
 * 
 * @author (your name) 
 * @version (a version number or a date)
 */
public class Loan
{
    // instance variables - replace the example below with your own
    private int id;
    private DVD dvd;
    private Copy copy;
    private Person person;
    private String loandate;
    private String returndate;
    private boolean active;

    /**
     * Constructor for objects of class Loan
     */
    public Loan(int id, DVD dvd, Copy copy, Person person, String loandate)
    {
        this.id = id;
        this.dvd = dvd;
        this.copy = copy;
        this.person = person;
        this.loandate = loandate;
        returndate = null;
        active = true;
    }

    public int getID()
    {
        return id;
    }

    public DVD getDVD()
    {
        return dvd;
    }

    public Copy getCopy()
    {
        return copy;
    }

    public Person getPerson()
    {
        return person;
    }

    public String getLoandate()
    {
        return loandate;
    }

    public String getReturndate()
    {
        return returndate;
    }

    public boolean getActive()
    {
        return active;
    }

    public void setID(int id)
    {
        this.id = id;
    }

    public void setDVD(DVD dvd)
    {
        this.dvd = dvd;
    }

    public void setCopy(Copy copy)
    {
        this.copy = copy;
    }

    public void setPerson(Person person)
    {
        this.person = person;
    }

    public void setLoandate(String loandate)
    {
        this.loandate = loandate;
    }

    public void setReturndate(String returndate)
    {
        this.returndate = returndate;
    }

    public void setActive(boolean active)
    {
        this.active= active;
    }

    public void printDetail()
    {
        System.out.println();
        System.out.println("#----------------------------------");
        System.out.println("# ID: "+ id);
        System.out.println("# DVD: ");
        dvd.printDetailDVD();
        System.out.println("# Copy: ");
        copy.printDetail();
        System.out.println();
        System.out.println("# Person: ");
        person.printDetail();
        System.out.println();
        System.out.println("# Loandate: "+ loandate);
        System.out.println("# Returndate: "+ returndate);
        System.out.println("# Active: "+ active);
    }
    
  
    
    
}
